import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

// HJ23 删除字符串中出现次数最少的字符
public class HJ23 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String str = sc.nextLine();
            char[] ch = str.toCharArray();
            Map<Character, Integer> map = new HashMap();
            for (int i = 0; i < ch.length; i++) {
                if (!map.containsKey(ch[i])) {
                    map.put(ch[i], 1);
                } else {
                    map.put(ch[i], map.get(ch[i]) + 1);
                }
            }
            int min = map.get(ch[0]);
            for (Map.Entry<Character, Integer> entry : map.entrySet()) {
                if (entry.getValue() < min) {
                    min = entry.getValue();
                }
            }
            for (int i = 0; i < ch.length; i++) {
                if (map.get(ch[i]) == min) {
                    str = str.replace(ch[i] + "", "");
                }
            }
            System.out.println(str);
        }
    }

}
